package com.ttbj.product.api;

import java.util.List;

import com.ttbj.product.bean.dto.OwnerDto;
import com.ttbj.product.bean.dto.ViewData;

/**
 * 寄件人或收件人的相关接口
 * @author Meivh
 *
 */
public interface OwnerFacade {

	/**
	 * 添加寄件人或收件人
	 * @throws Exception 
	 */
	public Long addOwner(String openId,OwnerDto dto) throws Exception;
	
	 
	/**
	 * 获取用户的全部寄件人或收件人信息
	 * @param opendId
	 */
	public List<OwnerDto> allOwner(String opendId,Integer isSender) throws Exception ;

	
	/**
	 * 删除寄件人或收件人信息
	 * @param openId
	 * @param senderNum
	 * @throws Exception
	 */
	public void delOwner(String openId,Long id, Integer isSender) throws Exception;
	
	
	
	/**
	 * 获取精确寄件人或收件人信息
	 * @param openId
	 * @param senderNum
	 * @throws Exception 
	 */
	public  OwnerDto  getOwner(String openId, Long id, Integer isSender) ;
	
	
	default  OwnerDto getOwnerById( Long id, Integer isSender){
		return getOwner(null, id, isSender);
	}


 
	
	

 
	
}
